package com.mybatis.flex.listener;

import com.mybatis.flex.entity.Account;
import com.mybatisflex.annotation.InsertListener;

import java.util.Date;

public class FlexInsertListener implements InsertListener {
    @Override
    public void onInsert(Object o) {
        Account account = (Account)o;
            account.setCreateUser("admin");
            account.setCreateDate(new Date());
        //account.setTenantId("....");
    }
}
